#ifndef HILL_BLOCK_GROUP
#include "Hill_Block_Group.h"
#endif

#include <iostream>
using namespace std;


//#ifndef LOADTEXTURE
//#include "loadtexture.h"
//#endif

//GLuint loadTexturewithSDL(const char*, GLenum);



Hill_Block_Group::Hill_Block_Group(int WIDTH, int DEPTH)
{
	width = WIDTH;
	depth = DEPTH;
	cubes = new Hill_Cube[width*depth];
}

Hill_Block_Group::~Hill_Block_Group()
{
	delete[] cubes;
}

void Hill_Block_Group::draw()
{

	for(int x = 0; x < width; x++)
	{
		for(int y = 0; y < depth; y++)
		{
			glPushMatrix();
				glTranslatef(x*2, 0, y*2);
				cubes[(x*width + y)].draw();
			glPopMatrix();
		}
	}
}

void Hill_Block_Group::setWidth_and_Depth(int WIDTH, int DEPTH)
{
	width = WIDTH;
	depth = DEPTH;
	cubes = new Hill_Cube[width*depth];
}